package com.movie.act;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.movie.bean.YouHuiNew;
import com.movie.util.Log;

/**
 * 07-最新优惠详情
 * 
 * @author Administrator
 * 
 */
public class YouHuiAct extends BaseActivity {

	private Context mContext = YouHuiAct.this;
	private YouHuiNew mYouHuiNew = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.youhuiact);
		initBackTitleBar();
		// Bundle mBundle=new Bundle();
		// mBundle.putSerializable("bean",
		// mMovieNewList.mYouHuiNews.get(position));
		mYouHuiNew = getData();
		show(mYouHuiNew);

	}

	private TextView name = null;
	private TextView date = null;
	private TextView address = null;
	private TextView context = null;
	private TextView des = null;

	private void show(YouHuiNew bean) {
		if (name == null) {
			name = (TextView) findViewById(R.id.name);
			date = (TextView) findViewById(R.id.date);
			address = (TextView) findViewById(R.id.address);
			context = (TextView) findViewById(R.id.context);
			des = (TextView) findViewById(R.id.des);
		}

		name.setText( bean.name );
		date.setText( bean.date );
		address.setText( bean.address );
		context.setText( bean.context );
		des.setText( bean.des );

	}

	private YouHuiNew getData() {
		Intent mIntent = getIntent();
		Log.i(mIntent.toString());
		Bundle mBundle = mIntent.getBundleExtra("data");
		mYouHuiNew = (YouHuiNew) mBundle.getSerializable("bean");
		return mYouHuiNew;
	}
}
